Basic knowledge of IOS development-fragment 49, basic knowledge of ios-49
1: parse the configuration file info. plist of the iOS Project
Localization native development region localized Executable file path Bundle identifier application unique identification InfoDictionary version plist file version number Bundle name the name of the folder created during installation Bundle display name program installed on mobile phone when, desktop display name Bundle versions string, the version Bundle version displayed on short iTunes is uploaded to APP Sore. The required version is Application requires. The environment in which the iPhone environment Application runs Launch screen interface file base name. The Main storyboard file base name is configured. storyboardRequired device capabilities cup architecture Supported interface orientations support View controller-based status bar appearance whether to cancel controller Management status bar
2: The latest permission settings for iOS
<! -- Album --> <key> NSPhotoLibraryUsageDescription </key> <string> the App requires your consent to access the album </string> <! -- Camera --> <key> NSCameraUsageDescription </key> <string> the App requires your consent to access the camera </string> <! -- Microphone --> <key> NSMicrophoneUsageDescription </key> <string> the App requires your consent to access the microphone </string> <! -- Location --> <key> NSLocationUsageDescription </key> <string> the App must have your consent to access the location </string> <! -- Access location during use --> <key> NSLocationWhenInUseUsageDescription </key> <string> the App requires your consent to access location during use </string> <! -- Always access location --> <key> NSLocationAlwaysUsageDescription </key> <string> the App must have your consent before it can always access the location </string> <! -- Calendar --> <key> NSCalendarsUsageDescription </key> <string> the App requires your consent to access the calendar </string> <! -- Reminder --> <key> NSRemindersUsageDescription </key> <string> the App requires your consent to access the reminder </string> <! -- Sports and fitness --> <key> NSMotionUsageDescription </key> <string> the App requires your consent to access sports and fitness </string> <! -- Health update --> <key> NSHealthUpdateUsageDescription </key> <string> the App requires your consent to access health update </string> <! -- Health sharing --> <key> nshealthpolicusagedescription </key> <string> the App requires your consent to access health sharing </string> <! -- Bluetooth --> <key> nsbluw.thperipheralusagedescription </key> <string> the App requires your consent to access Bluetooth </string> <! -- Media database --> <key> NSAppleMusicUsageDescription </key> <string> the App requires your consent to access the media database. </string>
3: About openURL
In iOS 2, Apple introduced the openURL method to redirect apps. However, in iOS 9, the related canOpenURL is in iOS 10, Apple has abandoned openURL and switched to openURL: options: completionHandler: instead, IOS10 can no longer enable system settings, etc, therefore, the following method can only be used in other jumps, and the subsequent method must be run on XCODE8;
Old:
-(BOOL) openURL :( NSURL *) url
New:
-(Void) openURL :( NSURL *) url options :( NSDictionary *) options
CompletionHandler :( void (^ _ nullable) (BOOL success) completion
Compatibility method:
- (void)openScheme:(NSString *)scheme { UIApplication *application = [UIApplication sharedApplication]; NSURL *URL = [NSURL URLWithString:scheme]; if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) { [application openURL:URL options:@{} completionHandler:^(BOOL success) { NSLog(@"Open %@: %d",scheme,success); }]; } else { BOOL success = [application openURL:URL]; NSLog(@"Open %@: %d",scheme,success); }}
4: About XCode 7
(Need to log on to Apple developer account) 7.2.1: https://developer.apple.com/services-account/download? Path =/cmd_tools/Xcode_7.2.1/Xcode_7.2.1.dmg7.2: https://developer.apple.com/services-account/download? Path =/cmd_tools/Xcode_7.2/Xcode_7.2.dmg7.1.1: https://developer.apple.com/services-account/download? Path =/cmd_tools/Xcode_7.1.1/Xcode_7.1.1.dmg7.1: https://developer.apple.com/services-account/download? Path =/cmd_tools/Xcode_7.1/Xcode_7.1.dmg7.0: https://developer.apple.com/services-account/download? Path =/Developer_Tools/Xcode_7/Xcode_7.dmg
5. Cloud related knowledge points
ICloud is an important part of IOS5. Every Apple ID user has a free iCloud account, but the user may disable the iCloud of a certain device. Two types of application storage are supported by iCloud:
1.1 document storage: stores user documents and application data to your iCloud account. You can use Document Storage to manage key application data. Document Storage is always used for files and data directly related to applications. For example, user documents, private app data files, and application or user-generated data files are restricted only by the space of your iCloud account. When the device changes, iCloud always pulls the file metadata and data; devices always pull the file metadata, but the file data is not pulled until the application tries to use the file; most of them are stored in combination;
1.2 key-value data storage: shares a small amount of non-key configuration data to multiple instances of the application. If you want to share parameters or other configuration data among multiple app instances, you can use key-vlaue storage instead of key data. Only property list data can be stored, and the capacity is limited to 64 KB. key-value data is regularly transmitted between devices and iCloud;
There is already a good example on the instance of document storage file git, you can achieve the effect of uploading files to multiple devices to share; Address: https://github.com/iRareMedia/iCloudDocumentSync
If you want to view the files saved on iCloud, you can install a software: http://cookingrobot.de/posts/plain-cloud
All file synchronization operations of iCloud are performed by a process residing in the system. That is to say, the iCloud directory corresponding to your App will be operated by your App process, and also by iCloud Daemon. In iOS systems, due to cell phone power consumption and network traffic, iCloud Daemon does not automatically download files added to the container by other devices. MetaData) transfer, such as file name, file size, modification time, and so on. That is to say, we need to query the object meta information list to get the Object List synchronized with the server. Only when you request to open a file will you download its content. But on a Mac laptop, other devices only need to add new files to the iCloud container, and your iCloud Daemon process will automatically download them.
The simplest form of iCloud is actually a specific folder, which is located in the/private/var/mobile/Library/Mobile Documents/directory of iOS devices. This directory stores all application data shared by applications to the cloud. The application has partial read/write permissions on the directory, which is unique to developers. For Password Key Strings, developers can share cloud data between applications. For example, all applications developed by Company X can share, view, and update the same file set. You cannot share data other than your developer account, so my application cannot see Company X files, and vice versa. The iOS system monitors the Mobile Documents folder. When files are changed, the device automatically uploads these changes to the cloud. These changes can be transmitted to all devices bound to the same account. These operations are handled by the local operating system service, and applications are not directly involved. Instead, applications subscribe to different types of notifications to let the application know the latest changes. Then, they can deal with data version conflicts by comparing local and iCloud data. It's just what developers do. They can select the "recently modified valid" policy. Or they can combine some other changes. The role of an application is to ensure that data on different hardware device units is consistent and that available network connections are required to handle this consistency. When a user loses the network connection, the problem arises. For example, you may edit the to-do list on a flight without a network connection, and your partner is updating the same to-do list in his or her city. Developers have been working for this for several months to study how to combine these changes and update the policy of the target file while accepting the changes made by both parties at the same time. Finally, there may be few ways to use the iCloud API. It is actually a storage folder for remote synchronization. It is precisely because you can operate on the same file of iCloud on multiple Apple devices that can lead to conflicts and it is very troublesome to solve such conflicts;
As mentioned in WWDC 2015, CloudKit can be used not only on iOS and OS X, but also on your website to integrate CloudKit JS so that iCloud users can use the corresponding functions in their browsers, or use CloudKit web service to directly send HTTP requests to the CloudKit server. In this regard, it may be verified by other platforms;