需要把 /node_modules/janalytics-react-native/ios/RCTJAnalyticsModule/janalytics-ios-2.1.2.a 文件名修改为 libjanalytics-ios-2.1.2.a
需要把 /node_modules/janalytics-react-native/ios/RCTJAnalyticsModule/janalytics-ios-2.1.2.a 文件名修改为 libjanalytics-ios-2.1.2.a
安装MAMP后,启动服务时提示Apache启动失败,80端口被占用.查看进程发现存在几个httpd. OS X自带Apache,可是默认是没有启动的.我也没有开启Web共享,怎么就开机启动了呢?
不知道是不是因为安装了别的什么软件导致的.一般的开机启动项可以在System Preferences–Users&Groups–Login Items中添加或删除.可是在这里也没有发现Apache相关的启动项.于是谷歌到了下面一个可行的方法,打开终端,执行下面的命令.
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
如果哪天你想让它开机启动了,则将unload 改为 load:
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
launchd是Mac OS下,用于初始化系统环境的关键进程。类似Linux下的init, rc.此方法同样也适用于禁用系统的一些服务,比如打印机,蓝牙等.
https://github.com/iPolaris/SoapRequest
http://www.codeproject.com/Tips/622376/iOS-Soap-Webservice-Calling-and-Parsing-the-Resp
//Import the frameworks header to your ViewController header file :
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
#import "SBJson.h"
//Unfortunately, there is no framework to create a SOAP message for us, so we will create the SOAP message as follows (this is the routine) :
- (IBAction)btnConvert:(id)sender {
NSString *soapMessage = [NSString stringWithFormat:@"\n"
"\n"
"\n"
" \n"
"%@ \n"
" \n"
" \n"
" \n" ,textFieldCelcisus.text];
NSURL *url = [NSURL URLWithString:@"http://w3schools.com/webservices/tempconvert.asmx"];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]];
[theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[theRequest addValue: @"http://tempuri.org/CelsiusToFahrenheit" forHTTPHeaderField:@"SOAPAction"];
[theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"];
[theRequest setHTTPMethod:@"POST"];
[theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *theConnection =
[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if( theConnection )
{
webData = [NSMutableData data] ;
NSLog(@"Problem");
}
else
{
NSLog(@"theConnection is NULL");
}
}// end of buton convert
//After making our request to the server, we need to catch the server response, for this. By using the connectionDidFinishLoading method, we catch the service response.
-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
[webData setLength: 0];
}
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[webData appendData:data];
}
-(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
NSLog(@"ERROR with theConenction");
}
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSLog(@"DONE. Received Bytes: %d", [webData length]);
NSString *theXML = [[NSString alloc] initWithBytes:
[webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];
}
//Now we got the data in XML form, but we need to parse this XML to get our fahrenheit value. To do that, we need to add NSXMLParser's delegate to our viewController:
@interface SEViewController : UIViewController
//In connectionDidFinishLoading method, we create an NSXMLParser object and pass the server response to it:
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSLog(@"DONE. Received Bytes: %d", [webData length]);
NSString *theXML = [[NSString alloc] initWithBytes:
[webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];
NSData *myData = [theXML dataUsingEncoding:NSUTF8StringEncoding];
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:myData];
// Don't forget to set the delegate!
xmlParser.delegate = self;
// Run the parser
BOOL parsingResult = [xmlParser parse];
}
//Finally, we will implement NSXMLParser's delegate methods to get each element:
-(void) parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:
(NSString *)qName attributes:(NSDictionary *)attributeDict
{
NSString *currentDescription = [NSString alloc];
}
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
curDescription = string;
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
if([elementName isEqual: @"CelsiusToFahrenheitResult"]);
textFieldResult.text = curDescription;
}
There may be a plethora of reasons that you need to check whether or not the device that is using your application has an internet connection.
I have listed two methods here. A quicky use a pre built class method or the do it yourself I like getting dirty with code method. Both ways are valid.
At the bottom there is also another solution posted by a StackOverflow member.
Method 1
You can use a simple (ARC and GCD compatible) class to do it for you.
1) Add SystemConfiguration framework to the project but don’t worry about including it anywhere
2) Add T.Million’s version of Reachability.h and Reachability.m to the project, get these files from the option below:
This content is locked!
Please support us, use one of the buttons below to unlock the content.
tweet
(continue reading…)
以zip打开.ipa文件,添加iTunesArtwork与iTunesMetadata.plist到根目录.
iTunesArtwork: 图标
iTunesMetadata.plist DEMO:
artistName
Company Name
itemName
App name
playlistArtistName
Company Name
playlistName
App name
最近项目中,介于测试人员提出的问题,有些情况只在ios6的设备上才能显现,而本机的xcode已升级到最新的5.0,这可如何是好呢,在网上搜索了一番,找到如下方法解决此问题: (continue reading…)
1. Certification(证书)
证书是对电脑开发资格的认证,每个开发者帐号有一套,分为两种:
1) DeveloperCertification(开发证书)
安装在电脑上提供权限:开发人员通过设备进行真机测试。
可以生成副本供多台电脑安装;
2)DistributionCertification(发布证书)
安装在电脑上提供发布iOS程序的权限:开发人员可以制做测试版和发布版的程序。
不可生成副本,仅有配置该证书的电脑才可使用;(副本制做介绍在下面Keychain中介绍) (continue reading…)
企业版IDP,即iOS Development Enterprise Program。注意是$299/Year那种,并不是$99/Year的那种。
这种方式的IDP其最大的好处在于:可以发布“In House”应用。
这种应用使用一种叫做“In House Distribution Provisioning Profile”的文件进行发布,不能发布到Apple Shop进行销售,也不需要经过Apple的评审。你可以把“In House”应用通过任何方式发布给你的企业员工、用户及其他你认可的任何人,尤其适合于企业应用的开发。 (continue reading…)