1. Using PCH Files
2. Configure the URL in Info.plist schemes
3.plist configuration Camera interface, copy, paste and other menu display language display in Chinese
PCH files can be used to store shared information
* Store some global macros (macros used throughout the project)
* Used to include all header files (header files used throughout the project) * can automatically turn on or off the log output function
Xcode6 previously created the PCH file automatically, the new version to be created manually, is Xcode7
Then in the project targets inside the building setting will precompile Prefix header to the right of the No to Yes and then Precompile Prefix header below the Prefix header right double-click, Add the project path of the PCH file that you just created, add the format: "$ (srcroot)/pch file under project path/pch filename", $ (srcroot) means the project root directory. If you're not sure, you can right-click the PCH file and show in Finder. (I used: $ (srcroot)/myim/customshared.pch) then you can import the header file that you want to use, or the macro definitionConfigure the URL in Info.plist schemesAdd the following attribute to the Info.plist file in Project A to add the following method to the project's APPDELGATE.M file
-(BOOL) Application: (UIApplication *) app OpenURL: (nsurl *) URL options: (nsdictionary<nsstring *,id> *) options{
Pass over the request string
NSString *text=[[url Host] stringbyaddingpercentencodingwithallowedcharacters:[ Nscharacterseturlqueryallowedcharacterset]];
Uialertcontroller *alert=[uialertcontroller alertcontrollerwithtitle:@ "Punch" Message:text PreferredStyle: Uialertcontrollerstylealert];
Uialertaction *cancel=[uialertaction actionwithtitle:@ "Cancel" Style:uialertactionstylecancel Handler:nil];
[Alert Addaction:cancel];
[Self.window.rootViewController Presentviewcontroller:alert Animated:YEScompletion:nil];
return YES;
}
Enter a test in Safari
vieim://user=123,pwd=456
4. Test in app, need to add trusted app
Info.plist Join
<key>LSApplicationQueriesSchemes</key>
<array>
<string>urlscheme</string>
<string>urlscheme2</string>
<string>urlscheme3</string>
<string>urlscheme4</string>
</array>
Call
[[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:@ "URL scheme://url identifier"];
The result shows that the app's address composition is: URL scheme://url identifier
The word behind the myapp://can be a point "." And the equals sign "=" cannot be a space and a question mark
plist Configuration Camera interface, copy, paste and other menu display language display in Chinese
In plist localization native development region chooses China,
Then localized resources can be mixed select YES, if there is no localized resources can be mixed, you need to manually add
Ios,plist file, PCH file