Home Backend Development PHP Tutorial iOS development questions (2)

iOS development questions (2)

Jan 20, 2017 am 09:26 AM

11. Unable to debug the device "Error launching remote program: failed to get the task forprocess 6405."
ad-hoc Profile does not support debugging. Change to development profile.
12. OTA cannot be downloaded, prompting "Cannot download application"
The bundle-identifier in the .plist file is written incorrectly (or contains Chinese characters), such as:

<key>bundle-identifier</key>
<string>com.xxx.--APN--</string>
Copy after login

where The com.xxx.—APN—contains Chinese ("--") and should be changed to English.
Or the signing certificate is invalid. Please detect the signing certificate in Orgnizer.
12. EXEC_BAD often appears in ASIHTTPRequest
When using ASIHTTPRequest to make asynchronous requests, program crashes often occur. Especially during the request process (not Finished), if you switch the view. Because it is an asynchronous request, the request object may call delegate (ViewController) at any time, and the ViewController may have been released at this time. Because UIKit will release the ViewController that is not currently displayed at any time. If you switch ViewController, the hidden ViewController will be released at any time. If the request calls back the delegate method of ViewController, and that ViewController happens to be released by UIKit, EXEC_BAD will result. It is also mentioned in the official documentation: Requests don't retain their delegates, so if there's a chance your delegatemay be deallocated while your request is running, it is vital that you clear the request's delegate properties. In most circumstances, if your delegate is going to be deallocated, you probably also want to cancel request, since you nolonger care about the request's status
So when using ASIHTTPRequest for asynchronous programming, we have to clear the delegate attribute of the request ourselves. In the dealloc method of delegate(ViewController) you should:

[request clearDelegatesAndCancel];
[request release];
Copy after login

Of course, request cannot be a temporary variable, but should be a retained member object (or attribute), otherwise you cannot clearDelegatesAndCancel.

13. Assertion failure in -[UIActionSheet showInView:]
Open action sheet in the main thread:

[selfperformSelectorOnMainThread:@selector(showActionSheet) withObject:nilwaitUntilDone:NO];
Copy after login


showActionSheet method:

-(void) showActionSheet
{ sheet = [[UIActionSheet alloc] initWithTitle:@"This is my ActionSheet!" delegate:self cancelButtonTitle:@"OK"destructiveButtonTitle:@"Delete Message!" otherButtonTitles:@"Option1", @"Option 2", @"Option 3", nil];
[sheet showInView:self.view];
}
Copy after login

14. RegexKitLite compilation error
The following error is prompted during compilation:

"_uregex_find", referenced from: _rkl_search in RegexKitLite.o
……
Copy after login

在Build Settgins的Other Linke Flag中加入
-licucore
15、Archive时遇到“ResourceRules.plist:cannot read resources”错误
在build settings中找到Code Signing Resource Rules Path,填入$(SDKROOT)/ResourceRules.plist

16、使用ZombieEnable解决EXEC_BAD_EXCESS错误
这个错误是向一个release对象发送消息导致的。可以通过开启ZombieEnable参数来查找真正的问题。
Edit Scheme,选择Run …Debug,打开Arguments组,在Environment Variables中添加一个参数:

运行程序,当出现EXEC_BAD_EXCESS错误时,控制台中会输出具体出错的信息,比如:
*** -[ITSMTicketCell release]: message sent to deallocated instance0x897e920
直接指明了是由于某个对象在被释放之后,你发送了一条消息给它。

17、 关于Xcode4无法调试2代代老设备的问题
升级到Xcode4以后,你会发现许多程序无法在2代设备(有些3代设备,比如iTouch 3实际上仍然是2代的硬件)上运行了,并且Xcode4仅仅“Running…”就直接“Finished…”了,无论是Xcode控制台还是设备日志中,都没有任何提示。
注意:2代和3代的区别在于cpu架构。2代设备使用ARMv6架构cpu,3代设备使用ARMv7架构cpu。 iPhone 2G/3G,iPod 1G/2G属于ARMv6架构(2代),iPhone3GS/4, iPod 3G,iPad属于ARMv7架构(3代)。
stackoverflow上有关于这个的帖子,其中shapecatcher的答案是最准确的:
http://stackoverflow.com/questions/6378228/switching-from-xcode3-to-xcode4-cant-load-programs-onto-older-ipod-touch
1、打开Target的Build Settings,找到Architectures选项,将其从“$(ARCHS_STANDARD_32_BIT)”修改为“armv6$(ARCHS_STANDARD_32_BIT)”。注意大小写是敏感的。“$(ARCHS_STANDARD_32_BIT)”是一个变量,实际上等同于armv7。
2、Base SDK不需要改变,仍然是Lastest iOS。
3、打开Target的info,找到Required device capabilities,将下面的armv7删除。这个选项是Xcode4自己添加在工程中的默认设置,如果不去掉它,第1步-第2步的工作是无法生效的。
18、“Avalid provisioning profile for this device was not found.”
在你的开发证书中增加该设备的UDID。

19、将设备添加到 portal
连接设备,打开Orgnizer。在设备列表中选中设备,点击右边窗口左下角的“Add to Portal”按钮。或者在设备列的设备上右击,选择“AddDevice to Provisioning Portal”。

20、renew profile
打开Orgnizer,在LIBRARY中选择Provisioning Profiles。在右边窗口选择要renew的profile,点击右下角的“Refresh”按钮。输入Portal的密码,profile将被renew。

21、renew签名证书及设备激活文档
从portal移除过期的签名证书
重新制作开发证书和发布证书
删除开发和部署所用的激活文档(provisioningprofiles)
使用新的证书重新制作用于开发和部署的Provisioningprofiles
从钥匙串中删除老的证书
在XcodeOrganizer中安装新的provisioning profiles
完成

以上就是iOS 开发百问(2)的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The first version of Apple's iOS 18 was exposed to have so many bugs: serious fever, WeChat delay The first version of Apple's iOS 18 was exposed to have so many bugs: serious fever, WeChat delay Jun 13, 2024 pm 09:39 PM

The annual WWDC has ended, and iOS18 is undoubtedly the focus of everyone's attention. Currently, many iPhone users are rushing to upgrade to iOS18, but various system bugs are making people uncomfortable. Some bloggers said that you should be cautious when upgrading to iOS18 because "there are so many bugs." The blogger said that if your iPhone is your main machine, it is recommended not to upgrade to iOS18 because the first version has many bugs. He also summarized several system bugs currently encountered: 1. Switching icon style is stuck, causing the icon not to be displayed. 2. Flashlight width animation is often lost. 3. Douyin App cannot upload videos. 4. WeChat message push is delayed by about 10 seconds. 5 . Occasionally, the phone cannot be made and the screen is black. 6. Severe fever.

Apple re-releases iOS/iPadOS 18 Beta 4 update, version number raised to 22A5316k Apple re-releases iOS/iPadOS 18 Beta 4 update, version number raised to 22A5316k Jul 27, 2024 am 11:06 AM

Thanks to netizens Ji Yinkesi, xxx_x, fried tomatoes, Terrence, and spicy chicken drumsticks for submitting clues! According to news on July 27, Apple today re-released the iOS/iPadOS 18 Beta 4 update for developers. The internal version number was upgraded from 22A5316j to 22A5316k. It is currently unclear the difference between the two Beta 4 version updates. Registered developers can open the "Settings" app, enter the "Software Update" section, click the "Beta Update" option, and then toggle the iOS18/iPadOS18 Developer Beta settings to select the beta version. Downloading and installing the beta version requires an Apple ID associated with a developer account. Reported on July 24, iO

Apple releases open source Swift package for homomorphic encryption, deployed in iOS 18 Apple releases open source Swift package for homomorphic encryption, deployed in iOS 18 Jul 31, 2024 pm 01:10 PM

According to news on July 31, Apple issued a press release yesterday (July 30), announcing the launch of a new open source Swift package (swift-homomorphic-encryption) for enabling homomorphic encryption in the Swift programming language. Note: Homomorphic Encryption (HE) refers to an encryption algorithm that satisfies the homomorphic operation properties of ciphertext. That is, after the data is homomorphically encrypted, specific calculations are performed on the ciphertext, and the obtained ciphertext calculation results are processed at the same time. The plaintext after state decryption is equivalent to directly performing the same calculation on the plaintext data, achieving the "invisibility" of the data. Homomorphic encryption technology can calculate encrypted data without leaking the underlying unencrypted data to the operation process.

Update | Hacker explains how to install Epic Games Store and Fortnite on iPad outside the EU Update | Hacker explains how to install Epic Games Store and Fortnite on iPad outside the EU Aug 18, 2024 am 06:34 AM

Update: Saunders Tech has uploaded a tutorial to his YouTube channel (video embedded below) explaining how to install Fortnite and the Epic Games Store on an iPad outside the EU. However, not only does the process require specific beta versions of iO

New features of Apple's iOS 18 'Boundless Notes” app: expanded Scenes functionality, introduced grid alignment New features of Apple's iOS 18 'Boundless Notes” app: expanded Scenes functionality, introduced grid alignment Jun 02, 2024 pm 05:05 PM

According to news on June 1, technology media AppleInsider published a blog post today, stating that Apple will launch a new navigation function of "Scenes" for the "Freeform" application extension in the iOS18 system, and add new options for object alignment. Introduction to the "Wubianji" application First, let's briefly introduce the "Wubianji" application. The application will be launched in 2022 and has currently launched iOS, iPadOS, macOS15 and visionOS versions. Apple’s official introduction is as follows: “Boundless Notes” is an excellent tool for turning inspiration into reality. Sketch projects, design mood boards, or start brainstorming on a flexible canvas that supports nearly any file type. With iCloud, all your boards

Apple iOS 17.5 RC version released: allows EU iPhone users to download apps from the website Apple iOS 17.5 RC version released: allows EU iPhone users to download apps from the website May 08, 2024 am 09:30 AM

[Click here to go directly to the upgrade tutorial] According to news on May 8, Apple pushed the iOS17.5RC update (internal version number: 21F79) to iPhone users today. This update is 70 days away from the last release. How to upgrade iOS/iPadOS/watchOS/macOS development version and public beta version? To upgrade the iOS/iPadOS17 developer preview version and public beta version, you can refer to the experience shared by friends: Experience Post 1||Experience Post 2||Experience Post 3||Experience Post 4. Starting from the iOS/iPadOS 16.4 Developer Preview Beta 1, you need to register for the Apple Developer Program. After registration, open the system [Settings] [Software Update] to see the upgrade option. Please note that your iPhone or IP

Apple iOS/iPadOS 18 Developer Preview Beta 4 released: Added CarPlay wallpapers, sorted out settings options, enhanced camera control Apple iOS/iPadOS 18 Developer Preview Beta 4 released: Added CarPlay wallpapers, sorted out settings options, enhanced camera control Jul 24, 2024 am 09:54 AM

Thanks to netizens Spicy Chicken Leg Burger, Soft Media New Friends 2092483, Handwritten Past, DingHao, Xiaoxing_14, Wowotou Eat Big Kou, Feiying Q, Soft Media New Friends 2168428, Slades, Aaron212, Happy Little Hedgehog, Little Earl, Clues for the little milk cat that eats fish! [Click here to go directly to the upgrade tutorial] According to news on July 24, Apple today pushed the iOS/iPadOS18 developer preview version Beta4 update (internal version number: 22A5316j) to iPhone and iPad users. This update is 15 days after the last release. . Carplay Wallpaper Apple has added wallpapers to CarPlay, covering light and dark modes. Its wallpaper style is similar to iPhone

Should iPhone12 ios16 be updated to ios17.5beta3? How is the experience of ios17.5beta3? Should iPhone12 ios16 be updated to ios17.5beta3? How is the experience of ios17.5beta3? Apr 25, 2024 pm 04:52 PM

Practical sharing... As Apple continues to launch new iOS versions, many iPhone users are faced with the choice of whether to upgrade the system. The release of the latest iOS17.5Beta3 has attracted widespread attention, especially for iPhone12 users. Whether they should abandon the existing iOS16 and try the new Beta version has become a question worth discussing. Based on actual experience, this article analyzes the pros and cons of upgrading iPhone 12 to iOS 17.5 Beta 3 to provide a reference for the majority of Apple fans. First of all, we need to make it clear that Beta versions are usually used by developers or early adopters who are willing to take a certain risk. This means that compared to the official version, the Beta version may contain

See all articles