Objective-C

RSS for tag

Objective-C is a programming language for writing iOS, iPad OS, and macOS apps.

Posts under Objective-C tag

218 Posts
Sort by:
Post not yet marked as solved
6 Replies
22k Views
Hi All,I am facing one problem in my app.That is open wifi access settings from my app.It is working fine in iOS 9.3.2 and it's not working in iOS10.is it possible to make it workable in iOS10?If so How to do that?Please help me over this to resolve the problem.Thanks,Suneelkumar Biyyapu.
Post not yet marked as solved
5 Replies
1.2k Views
I've been using Xcode and Objective-C for years, and rely heavily on the built-in documentation, which is for the most part good.There's an issue that's always bothered me. Today I was looking up a function called class_getName. I found its documentation page, and was also able to navigate to the page showing the overview of the runtime system, all of which is fine.When I typed "class_getName" into my program, the compiler immediately flagged it as an unknown symbol.I knew I probably had to include a header, but none of the documentation pages I looked at mentioned the name of the header file. I had to end up searching the internet for examples until I hit one that showed <objc/runtime.h> being imported.Why isn't this very small, simple and extremely useful bit of information included in the documentation?Frank
Posted
by
Post not yet marked as solved
4 Replies
2.3k Views
I have developed a application for my client (product based company) in ObjectiveC for past 4 years. Now, looking at the progress that Swift is making, I am confused if I am being left behind. My mind is full of below question:Will Apple start deprecating or stop supporting ObjectiveC sooner or laterif Yes, how long from now (approx or any hint from Apple)Is it right time to start migrating or wait for couple of more Swift versionsStatistics about apps migrated/being migrated. How many apps are in ObjectiveC & SwiftAny pointers to above queries is highly appreciated. Thanks in advance.
Posted
by
Post not yet marked as solved
4 Replies
22k Views
I would like to manually check if there are new updates for my app while the user is in it, and prompt him to download the new version. Can I do this by checking the version of my app in the app store - programatically?I found a solution by Checking response of my app itunesRL, i want to confirm if there is an official method, if not can i use this methode safely.https://stackoverflow.com/questions/6256748/check-if-my-app-has-a-new-version-on-appstore
Posted
by
Post not yet marked as solved
5 Replies
4.2k Views
Hi there, I'm working on an app that contains a mini system monitoring utility. I would like to list the top CPU-using processes. As Quinn “The Eskimo!” has repeatedly cautioned, relying on private frameworks is just begging for maintenance effort in the future. Ideally, I want to go through public headers/frameworks. I've gone to great lengths to try to find this information myself, and at this point I'm just struggling. I detail my research below. Any pointers in the right direction would be much appreciated! Attempts Libproc First I looked at libproc. Using proc_pidinfo with PROC_PIDTHREADINFO, I'm able to get each thread of an app, with its associated CPU usage percentage. Summing these, I could get the total for an app. Unfortunately, this has two downsides: Listing a table of processes now takes O(proces_count) rather than just O(process_count), and causes way more syscalls to be made It doesn't work for processes owned by other users. Perhaps running as root could alleviate that, but that would involve making a priviliedged helper akin to the existing sysmond that Activity Monitor.app uses. I'm a little scared of that, because I don't want to put my users at risk. Sysctl Using the keys [CTL_KERN, KERN_PROC, KERN_PROC_PID, someProcessID], I'm able to get a kinfo_proc - https://github.com/apple-opensource/xnu/blob/24525736ba5b8a67ce3a8a017ced469abe101ad5/bsd/sys/sysctl.h#L750-L776 instance. Accessing its .kp_proc - https://github.com/apple-opensource/xnu/blob/24525736ba5b8a67ce3a8a017ced469abe101ad5/bsd/sys/proc.h#L96-L150.p_pctcpu - https://github.com/apple-opensource/xnu/blob/24525736ba5b8a67ce3a8a017ced469abe101ad5/bsd/sys/proc.h#L123 looked really promising, but that value is always zero. Digging deeper, I found the kernel code that fills this struct in (fill_user64_externproc - https://github.com/apple-opensource/xnu/blob/c76cff20e09b8d61688d1c3dfb8cc855cccb93ad/bsd/kern/kern_sysctl.c#L1121-L1168). The assignment of p_pctcpu - https://github.com/apple-opensource/xnu/blob/c76cff20e09b8d61688d1c3dfb8cc855cccb93ad/bsd/kern/kern_sysctl.c#L1149 is in a conditional region, relying on the _PROC_HAS_SCHEDINFO_ flag. Disassembling the kernel on my mac, I could confirm that the assignment of that field never happens (thus _PROC_HAS_SCHEDINFO_ wasn't set during compilation, and the value will always stay zero) Reverse engineering Activity Monitor.app Activity Monitor.app makes proc_info and sysctl system calls, but from looking at the disassembly, it doesn't look like that's where its CPU figures come from. From what I can tell, it's using private functions from /usr/lib/libsysmon.dylib. That's a user library which wraps an XPC connection to sysmond (/usr/libexec/sysmond), allowing you to create requests (sysmon_request_create), add specific attributes you want to retrieve (sysmon_request_add_attribute), and then functions to query that data out (sysmon_row_get_value). Getting the data "striaght from the horses mouth" like this sounds ideal. But unfortunately, the only documentation/usage I can find of sysmond is from bug databases demonstrating a privilege escalation vulnerability lol. There are some partial reverse engineered header files floating around, but they're incomplete, and have the usual fragility/upkeep issues associated with using private APIs. On one hand, I don't want to depend on a private API, because that takes a lot of time to reverse engineer, keep up with changes, etc. On the other, making my own similar privileged helper would be duplicating effort, and expose a bigger attack surface. Needless to say, I have no confidence in being able to make a safer privileged helper than Apple's engineers lol Reverse engineering iStat Menus Looks like they're using proc_pid_rusage - https://github.com/apple-opensource/xnu/blob/24525736ba5b8a67ce3a8a017ced469abe101ad5/libsyscall/wrappers/libproc/libproc.h#L103-L108 . However, I don't know how to convert the cpu_*_time fields of the resulting struct rusage_info_v4 - https://github.com/apple-opensource/xnu/blob/24525736ba5b8a67ce3a8a017ced469abe101ad5/bsd/sys/resource.h#L306-L343 to compute a "simple" percentage. Even if I came up with some formula that produces plausible looking results, I have no real guarantee it's correct or equivalent to what Activity Monitor shows.
Posted
by
Post not yet marked as solved
6 Replies
2.2k Views
We used ecb mode before, but now we need to change to aes-gcm algorithm to encrypt and decrypt messages and verify signatures. I know that there is “/AES/GCM/NoPadding” in java to achieve gcm. Does Apple provide corresponding function libraries?
Posted
by
Post marked as solved
3 Replies
4.5k Views
Good day! I'm interested in if there is any way to query CPU/GPU/Battery temperature values on recent iOS systems? I've tried to search forums for "cpu temp", "ios temperature", "battery temperature" etc., but didn't find anything. There was only mentioned some old private API which was supposed to work somehow for iOS<10. All the examples I've found didn't even compile. All the requests and suggestions are pretty old and seems irrelevant. So I decided to bump this topic. Are there any updates? Any hints and suggestions are highly appreciated! Best regards!
Posted
by
Post not yet marked as solved
9 Replies
1.8k Views
I have created a command line application with Xcode, the application acquires permissions to capture screen (for example) however then I would like to remove only it with the command tccutil reset All [bundler id] the problem is that my executable seems to have no bundler id and I don't know how to remove it. I have also modified the Product Bundle Identifier option in the Build Settings tab but this didn't work either.
Posted
by
Post not yet marked as solved
1 Replies
782 Views
I implement a custom pytorch layer on both CPU and GPU following [Hollemans amazing blog] (https://machinethink.net/blog/coreml-custom-layers ). The cpu version works good, but when i implemented this op on GPU it cannot activate "encode" function. Always run on CPU. I have checked the coremltools.convert() options with compute_units=coremltools.ComputeUnit.CPU_AND_GPU, but it still not work. This problem also mentioned in https://stackoverflow.com/questions/51019600/why-i-enabled-metal-api-but-my-coreml-custom-layer-still-run-on-cpu and https://developer.apple.com/forums/thread/695640. Any idea on help this would be grateful. System Information mac OS: 11.6.1 Big Sur xcode: 12.5.1 coremltools: 5.1.0 test device: iphone 11
Posted
by
Post not yet marked as solved
1 Replies
701 Views
I've been seeing this crash happening for a few years now. It's rare and unreproducible. The App's storyboard is large and it can occur on any segue and randomly it seems Could not find a navigation controller for segue 'some-segue-on-storyboard'. Push segues can only be used when the source controller is managed by an instance of UINavigationController. I've tried various things to prevent it. Double checked it was on the main thread to keep the UI happy and assumed all this time that it was just an iOS glitch/bug that Apple would get around to fixing. That or it is a side effect of low memory. Anyone got any suggestions for how to fix or what to investigate?
Posted
by
Post not yet marked as solved
9 Replies
2.6k Views
Hi, I was working on a feature based on dns packet parsing in the VPN solution of my app on iOS. I was using the dns_parse_packet api from dnsutils.h class, which was able to parse dns requests and reply packets from raw bytes quite efficiently. I had tested this flow on iOS 15.2 but after updating to iOS 15.5 this api does not seem to work anymore. Has this API been deprecated or is this a bug in iOS 15.5?
Posted
by
Post not yet marked as solved
3 Replies
829 Views
Hi, I am trying to fix one of the crash coming on the App, I am attaching the Main thread Stack trace, Google search is also not giving any result, if anyone has faced the similar issue, or knew about it, can you help me in understanding the issue. 0 CoreGraphics                  0x179c CGColorSpaceIsUncalibrated + 4 1 QuartzCore                    0x8f410 CARequiresColorMatching + 64 2 QuartzCore                    0xf1614 CA_CGColorGetRGBComponents + 68 3 QuartzCore                    0x20098 -[NSObject(CAAnimatableValue) CA_interpolateValue:byFraction:] + 140 4 QuartzCore                    0x1c608 -[CABasicAnimation applyForTime:presentationObject:modelObject:] + 420 5 QuartzCore                    0x1c35c CA::Layer::presentation_layer(CA::Transaction*) + 428 6 UIKitCore                     0xe944 -[UIViewSpringAnimationState animationForLayer:forKey:forView:] + 136 7 UIKitCore                     0xdbe0 -[UIViewAnimationState actionForLayer:forKey:forView:] + 104 8 UIKitCore                     0xda64 +[UIView(Animation) _defaultUIViewActionForLayer:forKey:] + 92 9 UIKitCore                     0xd128 -[UIView(UIKitManual) actionForLayer:forKey:] + 308 10 QuartzCore                    0xad44 -[CALayer actionForKey:] + 148 11 QuartzCore                    0xabb8 CA::Layer::begin_change(CA::Transaction*, unsigned int, objc_object*, objc_object*&) + 212 12 QuartzCore                    0x130bc CA::Layer::setter(unsigned int, _CAValueType, void const*) + 812 13 QuartzCore                    0xd9c4 -[CALayer setBackgroundColor:] + 56 14 UIKitCore                     0x6b64c -[UIView _setBackgroundCGColor:withSystemColorName:] + 1036 15 UIKitCore                     0x6addc -[UIView _effectiveThemeTraitCollectionDidChangeInternal:] + 472 16 UIKitCore                     0x5f1a4 -[UIView _tintColorDidChange] + 208 17 UIKitCore                     0x5f00c -[_UITintColorVisitor _visitView:] + 312 18 UIKitCore                     0x5ed80 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 220 19 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 20 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 21 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 22 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 23 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 24 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 25 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 26 UIKitCore                     0x5ee28 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 388 27 UIKitCore                     0xee410 +[_UIViewVisitor _startTraversalOfVisitor:withView:] + 196 28 UIKitCore                     0x13ff94 -[UIView _dispatchTintColorVisitorWithReasons:] + 124 29 UIKitCore                     0x34aba8 -[UIView _beginOcclusion:] + 164 30 UIKitCore                     0x34a9fc -[UIPresentationController _enableOcclusion:] + 188 31 UIKitCore                     0x34a8b4 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 240 32 UIKitCore                     0x34a78c -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 272 33 UIKitCore                     0x34a660 __63+[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:]_block_invoke + 36 34 UIKitCore                     0xd25a4 -[UIViewAnimationState _runAlongsideAnimations] + 40 35 UIKitCore                     0xd12e8 -[UIViewAnimationState pop] + 40 36 UIKitCore                     0xd0d14 +[UIViewAnimationState popAnimationState] + 56 37 UIKitCore                     0xd0b40 +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 592 38 UIKitCore                     0x48e370 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:] + 124 39 UIKitCore                     0x3e9098 -[UIAlertControllerVisualStyleAlert animateAlertControllerView:ofAlertController:forPresentation:inContainerView:descendantOfContainerView:duration:completionBlock:] + 580 40 UIKitCore                     0x3e8be8 -[_UIAlertControllerAnimatedTransitioning _animateTransition:completionBlock:] + 456 41 UIKitCore                     0x570a6c -[_UIAlertControllerAnimatedTransitioning animateTransition:] + 412 42 UIKitCore                     0x7f765c ___UIViewControllerTransitioningRunCustomTransition_block_invoke_3 + 48 43 UIKitCore                     0x206614 +[UIKeyboardSceneDelegate _pinInputViewsForKeyboardSceneDelegate:onBehalfOfResponder:duringBlock:] + 96 44 UIKitCore                     0x2b6db0 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2 + 196 45 UIKitCore                     0x1f7e4c +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:] + 180 46 UIKitCore                     0x1f7d08 _UIViewControllerTransitioningRunCustomTransition + 484 47 UIKitCore                     0x762078 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke_3 + 1532 48 UIKitCore                     0x1a4958 -[_UIAfterCACommitBlock run] + 72 49 UIKitCore                     0x1a488c -[_UIAfterCACommitQueue flush] + 176 50 UIKitCore                     0x1a4798 _runAfterCACommitDeferredBlocks + 496 51 UIKitCore                     0x3f6c0 _cleanUpAfterCAFlushAndRunDeferredBlocks + 108 52 UIKitCore                     0x504fc4 _UIApplicationFlushCATransaction + 72 53 UIKitCore                     0x651678 _UIUpdateSequenceRun + 84 54 UIKitCore                     0xc90904 schedulerStepScheduledMainSection + 172 55 UIKitCore                     0xc8fad0 runloopSourceCallback + 92 56 CoreFoundation                0xd622c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 57 CoreFoundation                0xe2614 __CFRunLoopDoSource0 + 176 58 CoreFoundation                0x6651c __CFRunLoopDoSources0 + 244 59 CoreFoundation                0x7beb8 __CFRunLoopRun + 836 60 CoreFoundation                0x811e4 CFRunLoopRunSpecific + 612 61 GraphicsServices              0x1368 GSEventRunModal + 164 62 UIKitCore                     0x3a2d88 -[UIApplication _run] + 888 63 UIKitCore                     0x3a29ec UIApplicationMain + 340 64 PS Express                    0x28490 main + 34 (main.m:34) 65 ???                           0x1c6bc5948 (Missing)
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
I'm experiencing a weird issue on iOS16. There is no code change, it works fine on lower OS versions. The stack traces are: The first case: Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000000e5bde410 0 libobjc.A.dylib objc_release_x21 + 16 1 CoreData -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 1020 2 CoreData -[NSManagedObjectContext _processRecentChanges:] + 112 3 CoreData _performRunLoopAction + 412 4 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 5 CoreFoundation __CFRunLoopDoObservers + 532 6 CoreFoundation __CFRunLoopRun + 1048 7 CoreFoundation CFRunLoopRunSpecific + 612 8 GraphicsServices GSEventRunModal + 164 9 UIKitCore -[UIApplication _run] + 888 10 UIKitCore UIApplicationMain + 340 The second case, I believe this stack trace has the same root cause as the previous one (same trend, same UI page, only happens on iOS 16). Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0033003200390070 0 libobjc.A.dylib objc_msgSend + 32 1 CoreFoundation -[__NSArrayM dealloc] + 188 2 MyApplication MyClass.m - Line 361 -[MyClass loadMessages:] + 361 3 MyApplication MyClass.m - Line 125 __74-[MyClass requestRecentMessagesAndDiscardExistingMessagesCompletion:]_block_invoke + 125 4 libdispatch.dylib _dispatch_call_block_and_release + 32 5 libdispatch.dylib _dispatch_client_callout + 20 6 libdispatch.dylib _dispatch_main_queue_drain + 928 7 libdispatch.dylib _dispatch_main_queue_callback_4CF + 44 8 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 9 CoreFoundation __CFRunLoopRun + 2036 10 CoreFoundation CFRunLoopRunSpecific + 612 11 GraphicsServices GSEventRunModal + 164 12 UIKitCore -[UIApplication _run] + 888 13 UIKitCore UIApplicationMain + 340 MyClass.m is an Objective-C class, it has a property: @property (nonatomic, strong) NSArray<Message *> *messages; // Message is NSManagedObject In the second stacktrace, frame -[OurClass loadMessages:] + 361, the messages array is deallocated: self.messages = [[NSArray alloc] init...]; So my guess is, somehow the messages are over-released. If the messages are released in MyClass before, then the crash happens as the first stack trace, otherwise, it happens as the second stack trace. I've turned on -com.apple.CoreData.ConcurrencyDebug 1 to try to find out the concurrency issues and fixed them, but no luck. Any help would be much appreciated. Thanks in advance!
Posted
by
Post marked as solved
9 Replies
1.7k Views
When I use the following code to try to obtain an IP address, some phones fail to get the IP address. + (NSDictionary *)getWLANAddressInfo { NSMutableDictionary *dict = [NSMutableDictionary dictionary]; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int success = 0; // retrieve the current interfaces - returns 0 on success success = getifaddrs(&interfaces); if (success == 0) { // Loop through linked list of interfaces temp_addr = interfaces; while(temp_addr != NULL) { if(temp_addr->ifa_addr->sa_family == AF_INET) { // Check if interface is en0 which is the wifi connection on the iPhone if([[NSString stringWithUTF8String:temp_addr->ifa_name] isEqualToString:@"en0"]) { // Get NSString from C String NSString *address = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_addr)->sin_addr)]; NSString *dstaddr = [NSString stringWithUTF8String:inet_ntoa(((struct sockaddr_in *)temp_addr->ifa_dstaddr)->sin_addr)]; [dict setObject:address forKey:@"ip"]; [dict setObject:dstaddr forKey:@"dst"]; } } temp_addr = temp_addr->ifa_next; } } // Free memory freeifaddrs(interfaces); return dict; } The affected phones have iOS versions 16.3.1 and 16.4, Has anyone else encountered the same issue? What's causing this issue and how can I work around it?
Posted
by
Post not yet marked as solved
5 Replies
685 Views
I'm trying to follow the steps here https://developer.apple.com/documentation/coredata/setting_up_a_core_data_stack?language=objc for setting up core data using objective c, using the boilerplate given by xcode when opting into core data, but it appears to only show swift. The main view controller I have is of class TodoListTableViewController, which is storyboard-generated, which is embedded in a navigation controller like so: entrypoint->navigation controller->TodoListTableViewController I tried defining my AppDelegate::applicationDidFinishLaunchingWithOptions like so: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if (self.persistentContainer == nil) { [NSException raise:@"did not initialize persistent container in app delegate" format:@"no init"]; } UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; TodoListTableViewController *todoListVC = [mainStoryboard instantiateViewControllerWithIdentifier:@"TodoListTableViewController"]; todoListVC.persistentContainer = self.persistentContainer; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:todoListVC]; self.window.rootViewController = navController; return YES; } and using the boilerplate in AppDelegate @synthesize persistentContainer = _persistentContainer; - (NSPersistentContainer *)persistentContainer { // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. @synchronized (self) { if (_persistentContainer == nil) { _persistentContainer = [[NSPersistentContainer alloc] initWithName:@"ToDoList"]; [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { if (error != nil) { // Replace this implementation with code to handle the error appropriately. // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. /* Typical reasons for an error here include: * The parent directory does not exist, cannot be created, or disallows writing. * The persistent store is not accessible, due to permissions or data protection when the device is locked. * The device is out of space. * The store could not be migrated to the current model version. Check the error message to determine what the actual problem was. */ NSLog(@"Unresolved error %@, %@", error, error.userInfo); abort(); } }]; } } return _persistentContainer; } #pragma mark - Core Data Saving support - (void)saveContext { NSManagedObjectContext *context = self.persistentContainer.viewContext; NSError *error = nil; if ([context hasChanges] && ![context save:&error]) { // Replace this implementation with code to handle the error appropriately. // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog(@"Unresolved error %@, %@", error, error.userInfo); abort(); } } but I'm getting a missing container exception since I added a check for the existence of persistentContainer in TodoListTableViewController like so: - (void)viewDidLoad { [super viewDidLoad]; if (self.persistentContainer == nil) { [NSException raise:@"missing container" format:@"missing container"]; } } thank you.
Posted
by
Post not yet marked as solved
3 Replies
2.5k Views
My project was building fine with Xcode 14.1. After upgrading Xcode to 14.3 (and MacOS to Ventura), the project at first reported that build succeeded. But then when I tried to run the project, it suddenly reported that build failed, with the following error: ld: file not found: /Applications/Xcode 14.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a clang: error: linker command failed with exit code 1 (use -v to see invocation) The build fails while trying to link a cocoa pod library we use called SVProgressHUD. The full link command as found in the build log is as follows: Ld /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD/SVProgressHUD.framework/SVProgressHUD normal (in target 'SVProgressHUD' from project 'Pods') cd /Users/username/lineskip_dev/ios_apps/dudleys/Pods /Applications/Xcode\ 14.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios8.0 -dynamiclib -isysroot /Applications/Xcode\ 14.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -L/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphoneos -L/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD -F/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphoneos -F/Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD -filelist /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/SVProgressHUD.build/Objects-normal/arm64/SVProgressHUD.LinkFileList -install_name @rpath/SVProgressHUD.framework/SVProgressHUD -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/SVProgressHUD.build/Objects-normal/arm64/SVProgressHUD_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -framework QuartzCore -framework Foundation -framework QuartzCore -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/SVProgressHUD.build/Objects-normal/arm64/SVProgressHUD_dependency_info.dat -o /Users/username/Library/Developer/Xcode/DerivedData/Dudleys-awqewehuamgjgrfgdpuqcillyxfo/Build/Products/Debug-iphoneos/SVProgressHUD/SVProgressHUD.framework/SVProgressHUD What's strange is that we are successfully building other projects with Xcode 14.3 that use this same library. And I can't find the reason why the linker is trying to link to the file libarclite_iphoeos.a in the first place.
Posted
by
Post not yet marked as solved
2 Replies
541 Views
Is it possible to share NSURL and NString at the same time using the UIActivityViewController? I know it's possible using the MFMessageComposeViewController but wanted to use the native UI sheet so the user can select a different app if they wanted. In this example, the filePath variable is a path to a video file saved on the device. NSMutableArray *items = [NSMutableArray new]; [items addObject:[NSURL fileURLWithPath:filePath]]; UIViewController *rootViewController = UnityGetGLViewController(); UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil]; [rootViewController presentViewController:activity animated:YES completion:nil]; Updating the items with an additional string value will result in only the video being shared. NSMutableArray *items = [NSMutableArray new]; [items addObject:[NSURL fileURLWithPath:filePath]]; [items addObject:[NSString stringWithUTF8String:"Check out this video!"]]; UIViewController *rootViewController = UnityGetGLViewController(); UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil]; [rootViewController presentViewController:activity animated:YES completion:nil]; The "Check out this video!" text is never included in the iMessage app. Is this something that is possible? If not It would be nice to see some official Apple documentation about this. Also, this would be quite surprising considering iMessage is a built-in app, you would imagine it would have this capability.
Posted
by
Post not yet marked as solved
12 Replies
1.4k Views
Hi, ALL, I' have a Mac laptop with OSX 10.13 and Xcode 9. I am trying to develop a cross-platform C++ application using wxWidgets. It builds fine and I can successfully run it from the Terminal with "open myapp.app". However, trying to Run/Debug the application from inside Xcode fails - the application is crashing. Could someone please help me to run/debug the application from inside the Xcode? If needed - I can give a link to the GitHub Thank you in advance.
Posted
by
Post not yet marked as solved
0 Replies
360 Views
In my app I have the UIPopverController and it deprecated now. So I tried to show the PopOver using the UIPopoverPresentationController. Here I am facing some issues, The last item is showing as a footer of the Popover window and not able to click the item While clicking on other item it failed to navigate. How can I add the navigation. Previous code: SelectorViewController* sv = [[SelectorViewController alloc] initWithStyle:UITableViewStylePlain]; tsv.delegate = self; sv.currentTopic = self.title; popover = [[UIPopoverController alloc] initWithContentViewController:tsv]; popover.delegate = self; popover.popoverContentSize = [sv contentSizeForViewInPopover]; if ([popover respondsToSelector:@selector(setBackgroundColor:)]) popover.backgroundColor = [UIColor whiteColor]; [sv release]; } self.titleHeaderImage.highlighted = YES; [popover presentPopoverFromRect:self.titleView.frame inView:self.navigationController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; New One: [self presentViewController:contentViewController animated: YES completion: nil]; popover.delegate = self; // popover.popoverContentSize = [tsv preferredContentSize]; if ([popover respondsToSelector:@selector(setBackgroundColor:)]) popover.backgroundColor = [UIColor whiteColor]; /*popover = [[UIPopoverController alloc] initWithContentViewController:tsv]; popover.delegate = self; popover.popoverContentSize = [tsv preferredContentSize]; if ([popover respondsToSelector:@selector(setBackgroundColor:)]) popover.backgroundColor = [UIColor whiteColor];*/ [ssv release]; } self.titleHeaderImage.highlighted = YES; [popover preferredContentSize:self.navigationController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Posted
by
Post not yet marked as solved
2 Replies
1.5k Views
When my app enter to background, I start a background task, and when Expiration happens, I end my background task. The code likes below: backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ dispatch_async(dispatch_get_main_queue(), ^{ if (backgroundTask != UIBackgroundTaskInvalid) { [[UIApplication sharedApplication] endBackgroundTask:backgroundTask]; backgroundTask = UIBackgroundTaskInvalid; [self cancel]; } }); }]; When the breakpoint is triggered at the endBackgroundTask line, I also get the following log: [BackgroundTask] Background task still not ended after expiration handlers were called: <UIBackgroundTaskInfo: 0x282d7ab40>: taskID = 36, taskName = Called by MyApp, from MyMethod, creationTime = 892832 (elapsed = 26). This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(:) to avoid this. The log don't appear every time, so why is that? Is there something wrong with my code?
Posted
by