xcodebuild export ipa from xcarchive

 

xcodebuild -project mmbang.xcodeproj -scheme mmbang -configuration “ADHOC” archive -archivePath ~/Desktop/mmbang.xcarchive
xcodebuild -exportArchive -archivePath ${PROJECT_NAME}.xcarchive \
-exportPath ${PROJECT_NAME} \
-exportFormat ipa \
-exportProvisioningProfile ${PROFILE_NAME}

特别注意的是:

${PROFILE_NAME} 指的是 xxx_Adhoc5.mobileprovision里面的一个属性Name的值,并非文件路径

可以通过以下命令解码查看mobileprovision类型文件的内容

security cms -D -i /path/xxx_Adhoc5.mobileprovision

Mac import certificate and pkeys

 

security import Certificate.p12 -k ~/Library/Keychains/login.keychain -P password -T /usr/bin/codesign

But got error message ‘security: SecKeychainItemImport: User interaction is not allowed.’

security unlock-keychain

http://stackoverflow.com/questions/4369119/how-to-install-developer-certificate-private-key-and-provisioning-profile-for-io

11down voteaccepted

I found hints from: http://lists.apple.com/archives/apple-cdsa/2010/Mar/msg00021.html

The command is security. I’m reading manual page. I’ll update this answer later after trial 🙂

–(edit)–

First, we have to give ‘Always Allow’ access to the certificates/keys in the Keychain manually once. I don’t know how to do this without GUI.

And run the command security unlock-keychain before running build tool for every session. I’ve used SSH, so I had to execute it once for every login sessions.

Technical Note TN2151 Understanding and Analyzing iOS Application Crash Reports

 

https://developer.apple.com/library/ios/technotes/tn2151/_index.html

 

When an application crashes, a crash report is created which is very useful for understanding what caused the crash. This document contains essential information about how to symbolicate, understand, and interpret crash reports.

Introduction

When an application crashes on an iOS device, a crash report is created and stored on the device. Crash reports describe the conditions under which the application terminated, in most cases including a complete backtrace for each executing thread, and are typically very useful for debugging issues in the application. If you are an iOS developer, you should look at these crash reports to understand what crashes your application is having, and then try to fix them.

Crash reports with backtraces need to be symbolicated before they can be analyzed. Symbolication replaces memory addresses with human-readable function names and line numbers. If you get crash logs off a device through Xcode’s Devices window, then they will be symbolicated for you automatically after a few seconds. Otherwise you will need to symbolicate the .crash file yourself by importing it to the Xcode Devices window. See Symbolication for details.

A Low Memory report differs from other crash reports in that there are no backtraces in this type of report. When a low memory crash happens, you must investigate your memory usage patterns and your responses to low memory warnings. This document points to you several memory management references that you might find useful.

Acquiring Crash and Low Memory Reports

Debugging Deployed iOS Apps discusses how to retrieve crash and low memory reports directly from an iOS device.

Analyzing Crash Reports in the App Distribution Guide discusses how to view aggregate crash reports collected from TestFlight beta testers and users who have downloaded your app from the App Store.

Xcode7 免证书debug

 

http://www.cnblogs.com/xinjydeshow/p/4920174.html

注意事项:

1.需要使用全新的bundle-id(任何人都未注册过的)

2.一次只能绑定一个设备,换设备之后需要重新 fix issue(签名时报错),Xcode重新生成profile文件

总之,这个方法给业余爱好者使用是没什么问题,真正在商业项目中没法用,哪怕只是临时调试也没法用(很多项目对bundle-id做了校验 )