IPAddressChange: iphone_ip_change_pjsip_1_12.patch
File iphone_ip_change_pjsip_1_12.patch, 27.5 KB (added by bennylp, 12 years ago) |
---|
-
pjsip-apps/src/pjsua/pjsua_app.c
126 126 127 127 } app_config; 128 128 129 static int the_acc_id; 130 static pjsip_transport *the_transport; 129 131 130 132 //static pjsua_acc_id current_acc; 131 133 #define current_acc pjsua_acc_get_default() … … 175 177 } 176 178 #endif 177 179 180 void ip_change() 181 { 182 pj_status_t status; 183 184 PJ_LOG(3,(THIS_FILE, "xxx: IP change..")); 185 186 if (the_transport) { 187 status = pjsip_transport_shutdown(the_transport); 188 if (status != PJ_SUCCESS) 189 PJ_PERROR(1,(THIS_FILE, status, 190 "xxx: pjsip_transport_shutdown() error")); 191 192 pjsip_transport_dec_ref(the_transport); 193 the_transport = NULL; 194 } 195 196 status = pjsua_acc_set_registration(the_acc_id, PJ_FALSE); 197 if (status != PJ_SUCCESS) 198 PJ_PERROR(1,(THIS_FILE, status, 199 "xxx: pjsua_acc_set_registration(0) error")); 200 201 PJ_LOG(3,(THIS_FILE, "xxx: IP change done, " 202 "press \"rr\" to reregister..")); 203 } 204 178 205 /* Show usage */ 179 206 static void usage(void) 180 207 { … … 2751 2778 /* 2752 2779 * Handler registration status has changed. 2753 2780 */ 2754 static void on_reg_state (pjsua_acc_id acc_id)2781 static void on_reg_state2(pjsua_acc_id acc_id, pjsua_reg_info *info) 2755 2782 { 2783 struct pjsip_regc_cbparam *rp = info->cbparam; 2784 2756 2785 PJ_UNUSED_ARG(acc_id); 2757 2786 2758 2787 // Log already written. 2788 if (rp->code/100 == 2 && rp->expiration > 0 && rp->contact_cnt > 0) { 2789 /* Registration success */ 2790 if (the_transport) { 2791 PJ_LOG(3,(THIS_FILE, "xxx: Releasing transport..")); 2792 pjsip_transport_dec_ref(the_transport); 2793 the_transport = NULL; 2794 } 2795 /* Save transport instance so that we can close it later when 2796 * new IP address is detected. 2797 */ 2798 PJ_LOG(3,(THIS_FILE, "xxx: Saving transport..")); 2799 the_transport = rp->rdata->tp_info.transport; 2800 pjsip_transport_add_ref(the_transport); 2801 } else { 2802 if (the_transport) { 2803 PJ_LOG(3,(THIS_FILE, "xxx: Releasing transport..")); 2804 pjsip_transport_dec_ref(the_transport); 2805 the_transport = NULL; 2806 } 2807 } 2759 2808 } 2760 2809 2761 2810 … … 4498 4547 } 4499 4548 break; 4500 4549 4550 case 'P': 4551 ip_change(); 4552 break; 4553 4501 4554 default: 4502 4555 if (menuin[0] != '\n' && menuin[0] != '\r') { 4503 4556 printf("Invalid input %s", menuin); … … 4639 4692 app_config.cfg.cb.on_call_tsx_state = &on_call_tsx_state; 4640 4693 app_config.cfg.cb.on_dtmf_digit = &call_on_dtmf_callback; 4641 4694 app_config.cfg.cb.on_call_redirected = &call_on_redirected; 4642 app_config.cfg.cb.on_reg_state = &on_reg_state;4695 app_config.cfg.cb.on_reg_state2 = &on_reg_state2; 4643 4696 app_config.cfg.cb.on_incoming_subscribe = &on_incoming_subscribe; 4644 4697 app_config.cfg.cb.on_buddy_state = &on_buddy_state; 4645 4698 app_config.cfg.cb.on_buddy_evsub_state = &on_buddy_evsub_state; … … 4929 4982 4930 4983 /* Add accounts */ 4931 4984 for (i=0; i<app_config.acc_cnt; ++i) { 4932 status = pjsua_acc_add(&app_config.acc_cfg[i], PJ_TRUE, NULL); 4985 pjsua_acc_id acc_id; 4986 status = pjsua_acc_add(&app_config.acc_cfg[i], PJ_TRUE, &acc_id); 4933 4987 if (status != PJ_SUCCESS) 4934 4988 goto on_error; 4935 4989 pjsua_acc_set_online_status(current_acc, PJ_TRUE); 4990 4991 if (!the_acc_id) { 4992 the_acc_id = acc_id; 4993 } 4936 4994 } 4937 4995 4938 4996 /* Add buddies */ -
pjsip-apps/src/ipjsua/Classes/ipjsuaAppDelegate.m
16 16 * along with this program; if not, write to the Free Software 17 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 #import "Reachability.h" 19 20 #import <pjlib.h> 20 21 #import <pjsua.h> 21 22 #import "ipjsuaAppDelegate.h" … … 52 53 pj_thread_desc a_thread_desc; 53 54 pj_thread_t *a_thread; 54 55 pjsua_call_id ccall_id; 56 Reachability *internetReach; 55 57 56 58 pj_status_t app_init(int argc, char *argv[]); 57 59 pj_status_t app_main(void); 58 60 pj_status_t app_destroy(void); 59 61 void keepAliveFunction(int timeout); 62 void ip_change(); 60 63 61 64 void showMsg(const char *format, ...) 62 65 { … … 204 207 [self.mainView.textView scrollRangeToVisible:NSMakeRange([self.mainView.textView.text length] - 1, 1)]; 205 208 } 206 209 210 - (void) updateWithReachability: (Reachability *)curReach 211 { 212 NetworkStatus netStatus = [curReach currentReachabilityStatus]; 213 BOOL connectionRequired= [curReach connectionRequired]; 214 215 switch (netStatus) { 216 case NotReachable: 217 PJ_LOG(3,("", "Access Not Available..")); 218 connectionRequired= NO; 219 break; 220 case ReachableViaWiFi: 221 PJ_LOG(3,("", "Reachable WiFi..")); 222 break; 223 case ReachableViaWWAN: 224 PJ_LOG(3,("", "Reachable WWAN..")); 225 break; 226 } 227 228 if (connectionRequired) { 229 PJ_LOG(3,("", "Connection Required")); 230 } 231 } 232 233 /* Called by Reachability whenever status changes. */ 234 - (void)reachabilityChanged: (NSNotification *)note 235 { 236 Reachability* curReach = [note object]; 237 238 NSParameterAssert([curReach isKindOfClass: [Reachability class]]); 239 PJ_LOG(3,("", "reachability changed..")); 240 [self updateWithReachability: curReach]; 241 242 if ([curReach currentReachabilityStatus] != NotReachable && 243 ![curReach connectionRequired]) 244 ip_change(); 245 } 246 207 247 - (void)applicationDidFinishLaunching:(UIApplication *)application { 248 /* Observe the kNetworkReachabilityChangedNotification. When that 249 * notification is posted, the method "reachabilityChanged" will be called. 250 */ 251 [[NSNotificationCenter defaultCenter] addObserver: self 252 selector: @selector(reachabilityChanged:) 253 name: kReachabilityChangedNotification object: nil]; 254 255 internetReach = [[Reachability reachabilityForInternetConnection] retain]; 256 [internetReach startNotifier]; 257 [self updateWithReachability: internetReach]; 258 208 259 /* If there is no config file in the document dir, copy the default config file into the directory */ 209 260 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 210 261 NSString *cfgPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"/config.cfg"]; -
pjsip-apps/src/ipjsua/Classes/Reachability.h
1 /* 2 3 File: Reachability.h 4 Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. 5 6 Version: 2.2 7 8 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. 9 ("Apple") in consideration of your agreement to the following terms, and your 10 use, installation, modification or redistribution of this Apple software 11 constitutes acceptance of these terms. If you do not agree with these terms, 12 please do not use, install, modify or redistribute this Apple software. 13 14 In consideration of your agreement to abide by the following terms, and subject 15 to these terms, Apple grants you a personal, non-exclusive license, under 16 Apple's copyrights in this original Apple software (the "Apple Software"), to 17 use, reproduce, modify and redistribute the Apple Software, with or without 18 modifications, in source and/or binary forms; provided that if you redistribute 19 the Apple Software in its entirety and without modifications, you must retain 20 this notice and the following text and disclaimers in all such redistributions 21 of the Apple Software. 22 Neither the name, trademarks, service marks or logos of Apple Inc. may be used 23 to endorse or promote products derived from the Apple Software without specific 24 prior written permission from Apple. Except as expressly stated in this notice, 25 no other rights or licenses, express or implied, are granted by Apple herein, 26 including but not limited to any patent rights that may be infringed by your 27 derivative works or by other works in which the Apple Software may be 28 incorporated. 29 30 The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO 31 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED 32 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 33 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN 34 COMBINATION WITH YOUR PRODUCTS. 35 36 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR 37 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 39 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR 40 DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF 41 CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF 42 APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 43 44 Copyright (C) 2010 Apple Inc. All Rights Reserved. 45 46 */ 47 48 49 #import <Foundation/Foundation.h> 50 #import <SystemConfiguration/SystemConfiguration.h> 51 52 typedef enum { 53 NotReachable = 0, 54 ReachableViaWiFi, 55 ReachableViaWWAN 56 } NetworkStatus; 57 #define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification" 58 59 @interface Reachability: NSObject 60 { 61 BOOL localWiFiRef; 62 SCNetworkReachabilityRef reachabilityRef; 63 } 64 65 //reachabilityWithHostName- Use to check the reachability of a particular host name. 66 + (Reachability*) reachabilityWithHostName: (NSString*) hostName; 67 68 //reachabilityWithAddress- Use to check the reachability of a particular IP address. 69 + (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress; 70 71 //reachabilityForInternetConnection- checks whether the default route is available. 72 // Should be used by applications that do not connect to a particular host 73 + (Reachability*) reachabilityForInternetConnection; 74 75 //reachabilityForLocalWiFi- checks whether a local wifi connection is available. 76 + (Reachability*) reachabilityForLocalWiFi; 77 78 //Start listening for reachability notifications on the current run loop 79 - (BOOL) startNotifier; 80 - (void) stopNotifier; 81 82 - (NetworkStatus) currentReachabilityStatus; 83 //WWAN may be available, but not active until a connection has been established. 84 //WiFi may require a connection for VPN on Demand. 85 - (BOOL) connectionRequired; 86 @end 87 88 -
pjsip-apps/src/ipjsua/Classes/Reachability.m
Property changes on: pjsip-apps/src/ipjsua/Classes/Reachability.h ___________________________________________________________________ Added: svn:keywords + id Added: svn:eol-style + native
1 /* 2 3 File: Reachability.m 4 Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. 5 6 Version: 2.2 7 8 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. 9 ("Apple") in consideration of your agreement to the following terms, and your 10 use, installation, modification or redistribution of this Apple software 11 constitutes acceptance of these terms. If you do not agree with these terms, 12 please do not use, install, modify or redistribute this Apple software. 13 14 In consideration of your agreement to abide by the following terms, and subject 15 to these terms, Apple grants you a personal, non-exclusive license, under 16 Apple's copyrights in this original Apple software (the "Apple Software"), to 17 use, reproduce, modify and redistribute the Apple Software, with or without 18 modifications, in source and/or binary forms; provided that if you redistribute 19 the Apple Software in its entirety and without modifications, you must retain 20 this notice and the following text and disclaimers in all such redistributions 21 of the Apple Software. 22 Neither the name, trademarks, service marks or logos of Apple Inc. may be used 23 to endorse or promote products derived from the Apple Software without specific 24 prior written permission from Apple. Except as expressly stated in this notice, 25 no other rights or licenses, express or implied, are granted by Apple herein, 26 including but not limited to any patent rights that may be infringed by your 27 derivative works or by other works in which the Apple Software may be 28 incorporated. 29 30 The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO 31 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED 32 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 33 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN 34 COMBINATION WITH YOUR PRODUCTS. 35 36 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR 37 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 39 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR 40 DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF 41 CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF 42 APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 43 44 Copyright (C) 2010 Apple Inc. All Rights Reserved. 45 46 */ 47 48 #import <sys/socket.h> 49 #import <netinet/in.h> 50 #import <netinet6/in6.h> 51 #import <arpa/inet.h> 52 #import <ifaddrs.h> 53 #import <netdb.h> 54 55 #import <CoreFoundation/CoreFoundation.h> 56 57 #import "Reachability.h" 58 59 #define kShouldPrintReachabilityFlags 1 60 61 static void PrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment) 62 { 63 #if kShouldPrintReachabilityFlags 64 65 NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n", 66 (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', 67 (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', 68 69 (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', 70 (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', 71 (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', 72 (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', 73 (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', 74 (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', 75 (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', 76 comment 77 ); 78 #endif 79 } 80 81 82 @implementation Reachability 83 static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) 84 { 85 #pragma unused (target, flags) 86 NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); 87 NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); 88 89 //We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively 90 // in case someon uses the Reachablity object in a different thread. 91 NSAutoreleasePool* myPool = [[NSAutoreleasePool alloc] init]; 92 93 Reachability* noteObject = (Reachability*) info; 94 // Post a notification to notify the client that the network reachability changed. 95 [[NSNotificationCenter defaultCenter] postNotificationName: kReachabilityChangedNotification object: noteObject]; 96 97 [myPool release]; 98 } 99 100 - (BOOL) startNotifier 101 { 102 BOOL retVal = NO; 103 SCNetworkReachabilityContext context = {0, self, NULL, NULL, NULL}; 104 if(SCNetworkReachabilitySetCallback(reachabilityRef, ReachabilityCallback, &context)) 105 { 106 if(SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) 107 { 108 retVal = YES; 109 } 110 } 111 return retVal; 112 } 113 114 - (void) stopNotifier 115 { 116 if(reachabilityRef!= NULL) 117 { 118 SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); 119 } 120 } 121 122 - (void) dealloc 123 { 124 [self stopNotifier]; 125 if(reachabilityRef!= NULL) 126 { 127 CFRelease(reachabilityRef); 128 } 129 [super dealloc]; 130 } 131 132 + (Reachability*) reachabilityWithHostName: (NSString*) hostName; 133 { 134 Reachability* retVal = NULL; 135 SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); 136 if(reachability!= NULL) 137 { 138 retVal= [[[self alloc] init] autorelease]; 139 if(retVal!= NULL) 140 { 141 retVal->reachabilityRef = reachability; 142 retVal->localWiFiRef = NO; 143 } 144 } 145 return retVal; 146 } 147 148 + (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress; 149 { 150 SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress); 151 Reachability* retVal = NULL; 152 if(reachability!= NULL) 153 { 154 retVal= [[[self alloc] init] autorelease]; 155 if(retVal!= NULL) 156 { 157 retVal->reachabilityRef = reachability; 158 retVal->localWiFiRef = NO; 159 } 160 } 161 return retVal; 162 } 163 164 + (Reachability*) reachabilityForInternetConnection; 165 { 166 struct sockaddr_in zeroAddress; 167 bzero(&zeroAddress, sizeof(zeroAddress)); 168 zeroAddress.sin_len = sizeof(zeroAddress); 169 zeroAddress.sin_family = AF_INET; 170 return [self reachabilityWithAddress: &zeroAddress]; 171 } 172 173 + (Reachability*) reachabilityForLocalWiFi; 174 { 175 struct sockaddr_in localWifiAddress; 176 bzero(&localWifiAddress, sizeof(localWifiAddress)); 177 localWifiAddress.sin_len = sizeof(localWifiAddress); 178 localWifiAddress.sin_family = AF_INET; 179 // IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0 180 localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); 181 Reachability* retVal = [self reachabilityWithAddress: &localWifiAddress]; 182 if(retVal!= NULL) 183 { 184 retVal->localWiFiRef = YES; 185 } 186 return retVal; 187 } 188 189 #pragma mark Network Flag Handling 190 191 - (NetworkStatus) localWiFiStatusForFlags: (SCNetworkReachabilityFlags) flags 192 { 193 PrintReachabilityFlags(flags, "localWiFiStatusForFlags"); 194 195 BOOL retVal = NotReachable; 196 if((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect)) 197 { 198 retVal = ReachableViaWiFi; 199 } 200 return retVal; 201 } 202 203 - (NetworkStatus) networkStatusForFlags: (SCNetworkReachabilityFlags) flags 204 { 205 PrintReachabilityFlags(flags, "networkStatusForFlags"); 206 if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) 207 { 208 // if target host is not reachable 209 return NotReachable; 210 } 211 212 BOOL retVal = NotReachable; 213 214 if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) 215 { 216 // if target host is reachable and no connection is required 217 // then we'll assume (for now) that your on Wi-Fi 218 retVal = ReachableViaWiFi; 219 } 220 221 222 if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || 223 (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)) 224 { 225 // ... and the connection is on-demand (or on-traffic) if the 226 // calling application is using the CFSocketStream or higher APIs 227 228 if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) 229 { 230 // ... and no [user] intervention is needed 231 retVal = ReachableViaWiFi; 232 } 233 } 234 235 if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) 236 { 237 // ... but WWAN connections are OK if the calling application 238 // is using the CFNetwork (CFSocketStream?) APIs. 239 retVal = ReachableViaWWAN; 240 } 241 return retVal; 242 } 243 244 - (BOOL) connectionRequired; 245 { 246 NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef"); 247 SCNetworkReachabilityFlags flags; 248 if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) 249 { 250 return (flags & kSCNetworkReachabilityFlagsConnectionRequired); 251 } 252 return NO; 253 } 254 255 - (NetworkStatus) currentReachabilityStatus 256 { 257 NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef"); 258 NetworkStatus retVal = NotReachable; 259 SCNetworkReachabilityFlags flags; 260 if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) 261 { 262 if(localWiFiRef) 263 { 264 retVal = [self localWiFiStatusForFlags: flags]; 265 } 266 else 267 { 268 retVal = [self networkStatusForFlags: flags]; 269 } 270 } 271 return retVal; 272 } 273 @end -
pjsip-apps/src/ipjsua/ipjsua.xcodeproj/project.pbxproj
Property changes on: pjsip-apps/src/ipjsua/Classes/Reachability.m ___________________________________________________________________ Added: svn:keywords + id Added: svn:eol-style + native
18 18 3A0D789F121E324E009D5030 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A0D789E121E324E009D5030 /* CFNetwork.framework */; }; 19 19 3A0D7ECD123DD46C009D5030 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3A0D7ECC123DD46C009D5030 /* MainWindow-iPad.xib */; }; 20 20 3A0D7F20123F2254009D5030 /* SecondView-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3A0D7F1F123F2254009D5030 /* SecondView-iPad.xib */; }; 21 3AD13BEE13F54D8F00F1536A /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AD13BED13F54D8F00F1536A /* Reachability.m */; }; 22 3AD13C0913F8B0AE00F1536A /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AD13C0813F8B0AE00F1536A /* SystemConfiguration.framework */; }; 21 23 3AE9099D11587BB900FAEAA5 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AE9099C11587BB900FAEAA5 /* AudioToolbox.framework */; }; 22 24 3AE90A2D1158B52500FAEAA5 /* pjsua_app.c in Sources */ = {isa = PBXBuildFile; fileRef = 3AE90A2C1158B52500FAEAA5 /* pjsua_app.c */; }; 23 25 3AE90A6A1158C6B400FAEAA5 /* libgsmcodec-arm-apple-darwin9.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AE90A691158C6B400FAEAA5 /* libgsmcodec-arm-apple-darwin9.a */; }; … … 59 61 3A0D789E121E324E009D5030 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 60 62 3A0D7ECC123DD46C009D5030 /* MainWindow-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainWindow-iPad.xib"; path = "Resources-iPad/MainWindow-iPad.xib"; sourceTree = "<group>"; }; 61 63 3A0D7F1F123F2254009D5030 /* SecondView-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "SecondView-iPad.xib"; path = "Resources-iPad/SecondView-iPad.xib"; sourceTree = "<group>"; }; 64 3AD13BEC13F54D8F00F1536A /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; }; 65 3AD13BED13F54D8F00F1536A /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; }; 66 3AD13C0813F8B0AE00F1536A /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 62 67 3AE9099C11587BB900FAEAA5 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 63 68 3AE90A2C1158B52500FAEAA5 /* pjsua_app.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pjsua_app.c; path = ../pjsua/pjsua_app.c; sourceTree = SOURCE_ROOT; }; 64 69 3AE90A691158C6B400FAEAA5 /* libgsmcodec-arm-apple-darwin9.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libgsmcodec-arm-apple-darwin9.a"; path = "../../../third_party/lib/libgsmcodec-arm-apple-darwin9.a"; sourceTree = SOURCE_ROOT; }; … … 116 121 3AE90EBB115F7BCE00FAEAA5 /* libspeex-arm-apple-darwin9.a in Frameworks */, 117 122 3AE90EBC115F7BCE00FAEAA5 /* libsrtp-arm-apple-darwin9.a in Frameworks */, 118 123 3A0D789F121E324E009D5030 /* CFNetwork.framework in Frameworks */, 124 3AD13C0913F8B0AE00F1536A /* SystemConfiguration.framework in Frameworks */, 119 125 ); 120 126 runOnlyForDeploymentPostprocessing = 0; 121 127 }; … … 125 131 080E96DDFE201D6D7F000001 /* Classes */ = { 126 132 isa = PBXGroup; 127 133 children = ( 134 3AD13BEC13F54D8F00F1536A /* Reachability.h */, 135 3AD13BED13F54D8F00F1536A /* Reachability.m */, 128 136 3AE90DAB115BB1CF00FAEAA5 /* ConfigViewController.h */, 129 137 3AE90DAC115BB1CF00FAEAA5 /* ConfigViewController.m */, 130 138 28216C950DB411BC00E5133A /* FirstViewController.h */, … … 184 192 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 185 193 isa = PBXGroup; 186 194 children = ( 195 3AD13C0813F8B0AE00F1536A /* SystemConfiguration.framework */, 187 196 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 188 197 1D30AB110D05D00D00671497 /* Foundation.framework */, 189 198 288765070DF74369002DB57D /* CoreGraphics.framework */, … … 257 266 }; 258 267 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ipjsua" */; 259 268 compatibilityVersion = "Xcode 3.1"; 269 developmentRegion = English; 260 270 hasScannedForEncodings = 1; 271 knownRegions = ( 272 en, 273 ); 261 274 mainGroup = 29B97314FDCFA39411CA2CEA /* ipjsua */; 262 275 projectDirPath = ""; 263 276 projectRoot = ""; … … 293 306 3AE90A2D1158B52500FAEAA5 /* pjsua_app.c in Sources */, 294 307 3AE90C51115A35BB00FAEAA5 /* TabBarController.m in Sources */, 295 308 3AE90DAD115BB1CF00FAEAA5 /* ConfigViewController.m in Sources */, 309 3AD13BEE13F54D8F00F1536A /* Reachability.m in Sources */, 296 310 ); 297 311 runOnlyForDeploymentPostprocessing = 0; 298 312 }; … … 303 317 isa = XCBuildConfiguration; 304 318 buildSettings = { 305 319 ALWAYS_SEARCH_USER_PATHS = NO; 306 ARCHS = "$(ARCHS_ STANDARD_32_BIT)";320 ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; 307 321 COPY_PHASE_STRIP = NO; 308 322 GCC_DYNAMIC_NO_PIC = NO; 309 323 GCC_OPTIMIZATION_LEVEL = 0; … … 321 335 "\"$(SRCROOT)/../../../pjsip/lib\"", 322 336 ); 323 337 PRODUCT_NAME = ipjsua; 324 SDKROOT = iphoneos 3.2;338 SDKROOT = iphoneos; 325 339 TARGETED_DEVICE_FAMILY = "1,2"; 326 340 }; 327 341 name = Debug; … … 330 344 isa = XCBuildConfiguration; 331 345 buildSettings = { 332 346 ALWAYS_SEARCH_USER_PATHS = NO; 333 ARCHS = "$(ARCHS_ STANDARD_32_BIT)";347 ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; 334 348 COPY_PHASE_STRIP = YES; 335 349 GCC_PRECOMPILE_PREFIX_HEADER = YES; 336 350 GCC_PREFIX_HEADER = ipjsua_Prefix.pch; … … 346 360 "\"$(SRCROOT)/../../../pjsip/lib\"", 347 361 ); 348 362 PRODUCT_NAME = ipjsua; 349 SDKROOT = iphoneos 3.2;363 SDKROOT = iphoneos; 350 364 TARGETED_DEVICE_FAMILY = "1,2"; 351 365 }; 352 366 name = Release; … … 354 368 C01FCF4F08A954540054247B /* Debug */ = { 355 369 isa = XCBuildConfiguration; 356 370 buildSettings = { 357 ARCHS = "$(ARCHS_ STANDARD_32_BIT)";371 ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; 358 372 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 359 373 GCC_C_LANGUAGE_STANDARD = c99; 360 374 GCC_PREPROCESSOR_DEFINITIONS = USE_GUI; … … 377 391 ); 378 392 OTHER_CFLAGS = ""; 379 393 PREBINDING = NO; 380 SDKROOT = iphoneos 3.2;394 SDKROOT = iphoneos; 381 395 }; 382 396 name = Debug; 383 397 }; 384 398 C01FCF5008A954540054247B /* Release */ = { 385 399 isa = XCBuildConfiguration; 386 400 buildSettings = { 387 ARCHS = "$(ARCHS_ STANDARD_32_BIT)";401 ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; 388 402 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 389 403 GCC_C_LANGUAGE_STANDARD = c99; 390 404 GCC_PREPROCESSOR_DEFINITIONS = USE_GUI; … … 407 421 ); 408 422 OTHER_CFLAGS = ""; 409 423 PREBINDING = NO; 410 SDKROOT = iphoneos 3.2;424 SDKROOT = iphoneos; 411 425 }; 412 426 name = Release; 413 427 };