Post

Replies

Boosts

Views

Activity

Xcode 11: Building a static framework which includes other frameworks/libs into its binary in iOS
I have a framework target in Xcode 11.x to build a Dynamic framework with statically linking some 3rd party libraries using pod file. platform :ios, '9.0' #use_frameworks! target 'Framework' do pod 'DeviceUtil', '~> 2.0' end Now I have a requirement to build a Static framework, and for this I changed the "Mach-O' type to Static Library in 'Framework's' target build settings and able to create Static framework. The generated framework shows all architectures correctly (for architecture i386): (current ar archive random library for all architecutres x8664, armv7 & arm64)._ But the Static framework does not included 3rd party libraries within the Framework binary. How to generate a Static framework using Xcode11.x which includes other 3rd party libs in its binary? Also changing "Mach-O" type is good enough to generate a Static framework or is there any other way that I am missing?
2
1
1.7k
Sep ’20
NWPathMonitor's pathUpdateHandler block is getting called on app background to foreground transition
NWPathMonitor's pathUpdateHandler is getting called when the app is transitioned from background to foreground with a delay of >30secs in the background even when there is no change in the Network. This isn't expected. Also when network changes 'pathUpdateHandler' block gets invoked multiple times for the same interface type with same status (e.g., when I change from No WiFi -> WiFi, pathUpdateHandler is getting called 3 to 4 times with status satisfied and interface type wifi) Is this expected behaviour? Or is there a workaround for this kind of behaviour? I tested it on iPhone6S with iOS 13.7 and iPad with iOS 14.0 Here is my code snippet (void) startMonitor { self.pathMonitor = nw_path_monitor_create(); nw_path_monitor_set_update_handler(self.pathMonitor, ^(nw_path_t	_Nonnull path) { 		 		DDLogVerbose(@"Network path changed %d", nw_path_get_status(path)); 		if (nw_path_uses_interface_type(path, nw_interface_type_wifi))	{ 				DDLogVerbose(@"Network path user interface type WiFi"); 		} else if (nw_path_uses_interface_type(path, nw_interface_type_cellular))	{ 				DDLogVerbose(@"Network path user interface type Cellular"); 		} else if (nw_path_uses_interface_type(path, nw_interface_type_wired))	{ 				DDLogVerbose(@"Network path user interface type Wired"); 		} else if (nw_path_uses_interface_type(path, nw_interface_type_loopback))	{ 				DDLogVerbose(@"Network path user interface type Loopback"); 		} else if (nw_path_uses_interface_type(path, nw_interface_type_other))	{ 				DDLogVerbose(@"Network path user interface type Other"); 		} }); nw_path_monitor_start(self.pathMonitor); } The output is same even if I create the nwpathmonitor with a particular interface type
1
2
1.6k
Sep ’20