First talk about the environment, the system is Mac 10.10.4, Xcode 6.3,iphone 6 Plus,ios 8.2 has escaped
This method cell phone must jailbreak, no jailbreak will not have to try, go to Taobao buy a certificate toss toss, maybe also line, I did not try, if you can please tell me
OK, get to the point, here are a few questions
1, Xcode6.3 SDK only ios8.3, want to debug on ios8.2 phone, you need to install iOS 8.2 SDK, after Xcode upgrade, the old version of the SDK will be deleted, so to install the old version of the SDK, you have to re-download the old version of Xcode, I am here to download the Xcode 6.2 beta version, after installation, in the application, find the Xcode Beta, display the package content
SDK Directory/contents/developer/platforms/iphoneos.platform/developer/sdks
Copy the ios8.2 SDK to the same directory as the Xcode 6.3, it is important to note that IPHONEOS.SDK this directory name will be repeated, first rename, just add a 123 in the following line, after copying
Restart Xcode to see the SDK for iOS 8.2.
2, create a certificate, this online there are many, I would like to say on the line, first open keychain Access, certificate Assistant, create a certificate
Name: IPhone Developer,
Go all the way,
Fill in your Apple ID in the certificate information, email address
The next step is to continue, and finally click Create.
3. Create a signature script, create a gen_entitlements.py file, and copy the following code in
#!/usr/bin/env pythonimport sysimport structif len (sys.argv)! = 3:print "Usage:%s appname dest_file.xcent"% sys.argv[0]s Ys.exit ( -1) APPNAME = Sys.argv[1]dest = Sys.argv[2]if not Dest.endswith ('. xml ') and not Dest.endswith ('. Xcent '):p rint " Dest must is. XML (for Ldid) or. xcent (for Codesign) "Sys.exit ( -1) entitlements =" "" <?xml version= "1.0" encoding= "UTF-8 "? ><! DOCTYPE plist Public "-//apple//dtd plist 1.0//en" "Http://www.apple.com/DTDs/PropertyList-1.0.dtd" ><plist Version= "1.0" ><dict> <key>application-identifier</key> <string>%s</ string> <key>get-task-allow</key> <true/></dict></plist> "" "% APPNAMEF = Open (DEST, ' W ') if Dest.endswith ('. Xcent '): F.write ("\xfa\xde\x71\x71") F.write (Struct.pack (' >l ', Len ( Entitlements) + 8) F.write (entitlements) f.close ()
Then copy to, under the/applications/xcode.app/contents/developer/iphoneentitlements directory, iphoneentitlements default is not, need to create manually, sudo permissions are required and copying files is also
4, almost, open Xcode, make sure your Xcode is completely exited, then reopen, open, click on your project, find on the right, SDK set to ios8.2, and set to not sign
Create a new run Script inside the build phases
The contents of the inside are here
Export codesign_allocate=/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/usr/ Bin/codesign_allocateif ["${platform_name}" = = "Iphoneos"] | | ["${platform_name}" = = "Ipados"];then/applications/xcode.app/contents/developer/iphoneentitlements/gen_ entitlements.py "My.company.${project_name}" "${built_products_dir}/${wrapper_name}/${project_name}.xcent"; Codesign-f-S "IPhone Developer"--entitlements "${built_products_dir}/${wrapper_name}/${project_name}.xcent" "${ built_products_dir}/${wrapper_name}/"fi
, pay attention to is my.company.${project_name}, this to match your project identify, otherwise it will fail, can be viewed here, if not, you can modify
Finally, using USB to connect your iphone, then Xcode prompts you to choose your iphone, do not choose the simulator, a few seconds after your phone will automatically your app, in addition, if you want to say the app packaged into IPA, you can first use Xcode debugging, installed in the phone inside, Then you can export it with itools
At this point, the Xcode 6.3 certificate-free real-machine debugging is over
Xcode 6.3 Certificate-free real-machine debugging is jailbroken